package com.dks.repository;

import java.util.*;

import com.aliyuncs.exceptions.ClientException;
import com.dks.dto.UserDto;
import com.dks.exception.BaseException;
import com.dks.models.Users;
import com.dks.result.ResultModel;


public interface IUsersRepository {

    Integer insert(Users users);

    Integer update(Users users);

    Integer delete(Integer id);

    ResultModel<Object> select(Integer id);

    Integer cntByMap(Map<String, Object> map);

    List<Integer> getByMap(Map<String, Object> map);

    List<Users> getByMapList(Map<String, Object> map);

    Integer updateByCode(Users users);

    Users selectByBfCode(String bfCode);

    ResultModel<Object> getTelCode(String tel) throws BaseException, ClientException;

    ResultModel<Object> appLogin(String tel, String code, String wechatCode);

    ResultModel<Object> wechatLogin(String wechatCode) throws Exception;

    ResultModel<Object> getWeChatBindByUser(String tel);

    ResultModel<Object> wechatRegisterLogin(String tel, String randomNumParam, String openid, Integer userType) throws BaseException;

    ResultModel<Object> getUserInfo(Integer userId);

    ResultModel<Object> tcAppLogin(String tel, String code, String wechatCode);

    ResultModel<Object> bindingWechatUser(UserDto userDto);
}
